<?php $this->beginWidget('application.widgets.report.makeReport'); ?>
<div algin="center" width="100%">
    <b><u><?php echo $model->title; ?></u></b>
</div>
<br />
<?php if($pagination->getCurrentPage()==0):?>
    <table>
        <tr>
            <td width="75">
                Total Value :
            </td>
            <td>
                <?php echo '$ '.Yii::app()->format->formatNumber($model->reportValue);?>
            </td>
        </tr>
        <tr>
            <td width="75">
                Report Date :
            </td>
            <td>
                <?php echo Yii::app()->format->formatDate($model->date);?>
            </td>
        </tr>
    </table>
<?php endif; ?>
<div>
<table border="1" cellpadding="1" width="940px">
    <tr align="center" style="font-size: 28px;font-weight: bold">
        <td width="55"><b>Import date</b></td>
        <td width="60"><b>Marking</b></td>
        <td><b>Supplier</b></td>
        <td><b>Ref No.</b></td>
        <td width="60"><b>Value</b></td>
        <td width="110"><b>Import permit</b></td>
        <td><b>Consignee</b></td>
        <td width="55"><b>Export date</b></td>
        <td><b>Outward permit</b></td>
    </tr>
    <?php foreach($dataProvider->getData(true) as $data): ?>
    <tr align="center" style="font-size: 24px">
        <td height="30" width="55"><?php echo Yii::app()->format->formatDate($data->import_date) ?></td>
        <td height="30" width="60"><?php echo $data->marking; ?></td>
        <td height="30"><?php echo CHtml::encode($data->shipper->cname); ?></td>
        <td height="30"><?php echo $data->invoice_list; ?></td>
        <td height="30" width="60"><?php echo '$ '. Yii::app()->format->formatNumber($data->amt); ?></td>
        <td height="30" width="110"><?php echo $data->makeImportRef($data->courier,array('MAWB/OBL','HAWB/HBL')); ?></td>
        <td height="30"><?php echo CHtml::encode($data->consignee->cname); ?></td>
        <td height="30" width="55"><?php echo ($data->export)?Yii::app()->format->formatDate($data->export->export->etd):'-'; ?></td>
        <td height="30"><?php echo ($data->export)?$data->export->export->out_permit:'-'; ?></td>
    </tr>
    <?php endforeach;?>
    
</table>
</div>
<div align="right">
    <table>
        <tr align="right">
            <td align="right">
                Page: 
            </td>
            <td align="left">
                <?php echo $pagination->getCurrentPage()+1; ?> / <?php echo $pagination->getPageCount(); ?>
            </td>
        </tr>
    </table>
</div>
<?php $this->endWidget();?>